package com.telit.firecommand.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.telit.common.entity.PageData;
import com.telit.firecommand.entity.CommEmergencyPlan;
import com.telit.firecommand.entity.PlanType;

import java.math.BigDecimal;
import java.util.List;


/**
 * @Author:zhangwei
 * @Description:
 * @Time:Created on 2021/8/3 9:55
 */
public interface EmergencyPlanService extends IService<CommEmergencyPlan> {

    /**
     * 新增预案信息
     *
     * @param emergencyPlan
     */
    void add(CommEmergencyPlan emergencyPlan);

    CommEmergencyPlan info(Long id);

    /**
     * 分页条件查询应急预案信息
     *
     * @param current
     * @param size
     * @param startTime
     * @param endTime
     * @param planName
     *
     * @return
     */
    IPage<CommEmergencyPlan> selectByPage(Integer current, Integer size, String startTime, String endTime,
                                          String planName, String planType, String fileCode);

    /**
     * 无分页条件查询应急预案信息
     *
     * @param startTime
     * @param endTime
     * @param planName
     *
     * @return
     */
    List<CommEmergencyPlan> selectByNoPage(String startTime, String endTime, String planName, String planType,
                                           String fileCode);

    /**
     * 更新应急预案信息
     *
     * @param emergencyPlan
     */
    void updateData(CommEmergencyPlan emergencyPlan);

    /**
     * 逻辑删除应急预案信息
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据ID数组删除应急预案信息表
     *
     * @param ids
     * @return
     */
    List<Integer> deleteBatch(Long[] ids);

    void addPlanType(PlanType planType);

    void deletePlanType(String id);

    List<CommEmergencyPlan> list(String startTime, String endTime, String planName, String planType,
                                 String fileCode);

    /**
     * 查询匹配列表
     */
    PageData<List<CommEmergencyPlan>> match(Integer current, Integer size, String planType, String planLevel,
                                            Integer planPeople, BigDecimal planFireArea);

}
